package com.ls.user.service.impl;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ls.user.mapper.UserScoreMapper;
import com.ls.user.pojo.entity.UserScore;
import com.ls.user.service.IUserScoreService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaotang
 * @since 2023-04-07
 */
@Service
public class UserScoreServiceImpl extends ServiceImpl<UserScoreMapper, UserScore> implements IUserScoreService {

    @Override
    public UserScore getScoreByUserId(Integer userId) {
        return baseMapper.selectOne(Wrappers.<UserScore>lambdaQuery().eq(UserScore::getUserId, userId));
    }
}
